<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
require "../includes/appheader.php";
require "../includes/functions.php";


$type=$_GET['type'];
$offerType=$_GET['offerType'];
$price=$_GET['price'];
$area=$_GET['area'];
$details=$_GET['details'];
$lat=$_GET['lat'];
$lng=$_GET['lng'];
$city=$_GET['city'];
$date=date("Y-m-d");

$status=false;

if($type == 1){ //APARTMENT
    $story=$_GET['story'];
    $totalStory=$_GET['totalStory'];
    $room=$_GET['room'];
    $bedRoom=$_GET['bedRoom'];
    $bath=$_GET['bath'];

    $propId=addProperty($type,$offerType,$date,$area,$price,$details,$city,$lat,$lng);
    //if(addApartment($propId, $story, $totalStory, $room, $bedRoom, $bath) ) $status=true;
    $status=true;
    
}else if($type == 2){ //HOUSE

}else if($type == 3){ //BUILDING

}else if($type == 4){

}

if($status){
    //Emlak eklendi
    echo "Emlak Ekleme Tamamlandı";

}else{
    //Emlak Eklenemedi
    echo "Hata Emlak Eklenemedi";
}
?>
